<?php


namespace app\common\services;


class NotesService
{
    /**
     * @param $adminInfo array 后台用户信息
     * @param $data array 后台用户信息
     * @return array
     */
    public function index($adminInfo, $data)
    {
        $info = [
            'admin_user_id' => $adminInfo['id'],
            'admin_user_name' => $adminInfo['ad_name'],
            'admin_user_phone' => $adminInfo['ad_tel'],
            'admin_user_identity' => $adminInfo['ro_id'],
            'edit_time' => date('Y-m-d H:i:s'),
            'content' => $data['content'],
            'type' => $data['type'],
            'chongzhi_ren' => $data['tel'],
            'yuan_money' => $data['yuan_money'],
            'chongzhi_money' => $data['chongzhi_money'],
            'over_money' => $data['over_money']
        ];

        $insert = model('recording')->insert($info);
        if ($insert) {
            return ['code' => 1, 'msg' => '成功'];
        } else {
            return ['code' => 0, 'msg' => '失败'];
        }
    }

}